package com.colldown.iservice.demo.webc.impl;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.colldown.iservice.demo.service.IDemoService;
import com.colldown.iservice.demo.webc.IDemoForm;

@Controller
@RequestMapping("/demo/form")
public class DemoFormImpl implements IDemoForm {
	
	@Autowired
	IDemoService demoService;

	@Override
	@RequestMapping("insert")
	public String demoInsert(HttpServletRequest request,
			HttpServletResponse response, Model model) {
		
		Map map = new HashMap();
		map.put("demoName", "lucky luck!");
		//String result = this.demoService.queryDemo(map);
		model.addAttribute("sayhello","DemoForm...");
		return "demo";
	}

}
